#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>

#include "dominion.h"
#include "dominion_helpers.h"
#include "rngs.h"

void test_smithy()
{
	int currentPlayer;
	struct gameState state;
	int handPos;
	int old_handCount;

	currentPlayer = 0;
	handPos = 0;

	state.handCount[currentPlayer] = 4;
	old_handCount = state.handCount[currentPlayer] - 1;

	/* Test One: Ensure player gets three more cards */
	cardEffect(smithy, 0, 0, 0, &state, handPos, 0);

	if (state.handCount[currentPlayer] == (old_handCount + 3)) {
		printf("Test One: PASS\n");
	}
	else {
		printf("Test Two: FAIL - did not draw three cards\n");
	}

	/* Test Two: Discard smithy card */
	if (state.handCount[currentPlayer] == old_handCount + 3) {
		printf("Test Two: PASS\n");
	}
	else {
		printf("Test Two: FAIL - did not discard smithy card\n");
	}
}

int main(void)
{
	test_smithy();
	return EXIT_SUCCESS;
}